]> dgit.raspbian.org Git - gnome-shell.git/commit
dateMenu: Fix temperature edge case
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 20 Dec 2020 22:11:26 +0000 (23:11 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 22 Dec 2020 09:27:45 +0000 (09:27 +0000)
commite85d127ae3851099cb6481ec6f0487a3661745a7
tree8153295afede41a65ea9e2cc9415d4163e868c41
parentadaa5ec6bd236f40f29cd9e867b80bc47c7beb7e
dateMenu: Fix temperature edge case

We currently format the temperature with a precision of 0, that is
with no digits after the decimal-point. As a result, a temperature
like -0.2 shows up as -0.

Math.trunc() has the same effect as `%.0f` and handles that edge
case correctly, but while at it, we can just as well round the
value properly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3441

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1548>
js/ui/dateMenu.js